package com.mbc.hr.entities;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;

@SuppressWarnings("serial")
@Entity
@Table(name="HR_DailyAttendance")
@NamedQueries({
	@NamedQuery(name="DailyAttendance.getAttendanceByInDate",query="SELECT da FROM DailyAttendance da WHERE (da.inDateTime BETWEEN :startDate AND :endDate) AND da.employeeId = :employeeId"),
	@NamedQuery(name="DailyAttendance.getPreviousAttendance", query="SELECT da FROM DailyAttendance da WHERE da.actualInDateTime < :inDateTime AND da.employeeId = :employeeId order by da.actualInDateTime desc")
})
public class DailyAttendance implements Serializable {
	@Id
	private long id;
	private Long createdBy;
	private Date createdDate;
	private Long modifiedby;
	private Date modifiedDate;
	private long branchId;
	private long employeeId;
	private Date actualInDateTime;
	private Date actualOutDateTime;
	private Date inDateTime;
	private Date outDateTime;
	private String remark;
	private byte attendanceType;
	
	@Transient
	private String employeeName;
	
	public Date getActualInDateTime() {
		return actualInDateTime;
	}
	public void setActualInDateTime(Date actualInDateTime) {
		this.actualInDateTime = actualInDateTime;
	}
	public Date getActualOutDateTime() {
		return actualOutDateTime;
	}
	public void setActualOutDateTime(Date actualOutDateTime) {
		this.actualOutDateTime = actualOutDateTime;
	}	
	public Long getCreatedBy() {
		return createdBy;
	}
	public void setCreatedBy(Long createdBy) {
		this.createdBy = createdBy;
	}
	public Date getCreatedDate() {
		return createdDate;
	}
	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}
	public Long getModifiedby() {
		return modifiedby;
	}
	public void setModifiedby(Long modifiedby) {
		this.modifiedby = modifiedby;
	}
	public Date getModifiedDate() {
		return modifiedDate;
	}
	public void setModifiedDate(Date modifiedDate) {
		this.modifiedDate = modifiedDate;
	}
	public Date getInDateTime() {
		return inDateTime;
	}
	public void setInDateTime(Date inDateTime) {
		this.inDateTime = inDateTime;
	}
	public Date getOutDateTime() {
		return outDateTime;
	}
	public void setOutDateTime(Date outDateTime) {
		this.outDateTime = outDateTime;
	}
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public long getBranchId() {
		return branchId;
	}
	public void setBranchId(long branchId) {
		this.branchId = branchId;
	}
	public long getEmployeeId() {
		return employeeId;
	}
	public void setEmployeeId(long employeeId) {
		this.employeeId = employeeId;
	}
	public String getEmployeeName() {
		return employeeName;
	}
	public void setEmployeeName(String employeeName) {
		this.employeeName = employeeName;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public byte getAttendanceType() {
		return attendanceType;
	}
	public void setAttendanceType(byte attendanceType) {
		this.attendanceType = attendanceType;
	}
}
